package com.yuma.springshiroredisthymeleaf.service.impl;

import com.yuma.springshiroredisthymeleaf.dao.GoodsDao;
import com.yuma.springshiroredisthymeleaf.entity.Goods;
import com.yuma.springshiroredisthymeleaf.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.SQLException;
import java.util.List;

@Service
public class GoodsServiceImpl implements GoodsService {

    @Autowired
    GoodsDao goodsDao;

    @Override
    public Goods selectById(Integer id) throws SQLException {
        return goodsDao.selectById(id);
    }

    @Override
    public Goods selectById2(Integer id) throws SQLException {
        return goodsDao.selectById2(id);
    }

    @Override
    public Goods selectById3(Goods goods) throws SQLException {
        return goodsDao.selectById3(goods);
    }

    @Override
    public Goods selectById4(Goods goods) throws SQLException {
        return goodsDao.selectById4(goods);
    }

    @Override
    public Integer insertSelective(Goods goods) throws SQLException {
        return goodsDao.insertSelective(goods);
    }

    @Override
    public Integer updateSelective(Goods goods) throws SQLException {
        return goodsDao.updateSelective(goods);
    }

    @Override
    public List<Goods> selectByCondition(Goods goods) throws SQLException {
        return goodsDao.selectByCondition(goods);
    }

    @Override
    public int deleteByIds(List<Integer> ids) throws SQLException {
        return goodsDao.deleteByIds(ids);
    }

    @Override
    public int deleteById(Integer id) {
        return goodsDao.deleteById(id);
    }
}
